//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_randomindexarray.sqf"
#include "x_setup.sqf"

// creates an array with count random indices
// parameters: int (number of entries)
// example: _myrandomindexarray = _numberentries call FUNC(RandomIndexArray);
private ["_count","_ran_array"];
_count = _this;
_ran_array = [];
for "_i" from 0 to (_count - 1) do {_ran_array set [count _ran_array, _i]};
// TYRGHEN - Just to add some more randomness in the not so random arma random function :)
_ran_array = _ran_array call FUNC(RandomArray);
(_ran_array call FUNC(RandomArray))